/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package view;
import GUI.JFrameBase;

/**
 *
 * @author aeguzkiza
 * Class created to add hidden information tyo JTree nodes.
 */
public class Study {
    JFrameBase frame;
    boolean isWorklist;
    String date;
    Integer id;

    Study(String date, Integer id, boolean isWorklist) {
        this.date = date;
        this.id = id;
        this.isWorklist = isWorklist;
    }        
    public Integer getStudyId(){
        return id;
    }
    public void setDate(String date){
        this.date = date;
    }
    public void setWorklist(boolean isWorklist){
        this.isWorklist = isWorklist;
    }
    public String toString() {
        String node = date;
        if(date.equals(frame.newStudy)){
            node += "";
        }else if(isWorklist == true){
            node += " [fecha programada]";
        }else{
            node += " [fecha realización]";
        }
        //System.out.println("node: "+node);
        return node;
    }
    public boolean isWorklist() {
        return isWorklist;
    }
}
